import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
import VueAxios from 'vue-axios'
import Vant from 'vant'
import 'vant/lib/index.css'
import BaiduMap from 'vue-baidu-map'
import { Swipe, SwipeItem } from 'vant';
import { Grid, GridItem } from 'vant';
import { SwipeCell } from 'vant';
import { Sidebar, SidebarItem } from 'vant';
import { Notify } from 'vant';
import { NavBar } from 'vant';

import { Popup } from 'vant';
import { Sku } from 'vant';

import { Stepper } from 'vant';
import { AddressList } from 'vant';
import { Badge } from 'vant';

Vue.use(Badge);

Vue.use(AddressList);

Vue.use(Stepper);
Vue.use(Sku);

Vue.use(Popup);

Vue.use(NavBar);

Vue.use(Notify);

Vue.use(Sidebar);
Vue.use(SidebarItem);

Vue.use(SwipeCell);

Vue.use(Grid);
Vue.use(GridItem);

Vue.use(Swipe);
Vue.use(SwipeItem);

Vue.use(BaiduMap, {
  ak: 'jp4zxA4bBzxrWSzGrEQiuVGYP2X9vzuU'
})
//使用
Vue.use(VueAxios, axios)
Vue.prototype.$axios = axios  //43.143.89.149
axios.defaults.baseURL = 'http://43.143.89.149:8888'
// 请求拦截 实现请求自动携带令牌
axios.interceptors.request.use((config) => {
  config.headers.javatoken = store.state.token
  return config;
})
//设置使用Vant组件
Vue.use(Vant);

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

